<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			
			//数组去重
			var arr = [12,45,56,78,89,545,123,12,45,56,78,456,545];
			var arr1 = [];
			for(var i=0;i<arr.length;i++){
				if(arr1.indexOf(arr[i])==-1){
					arr1.push(arr[i])
				}
			}
			document.write(arr1)
		</script>
	</body>
</html>
